import { Directive, HostBinding, Input } from '@angular/core';

@Directive({ selector: '[appGridItemTitle]' })
export class GridItemTitleDirective {
  @HostBinding('style.font-size')  @Input() appGridItemTitle = '0.5rem';
  @HostBinding('style.grid-area') area = 'title';
}

// // 第一种绑定样式的方法
// export class GridItemTitleDirective implements OnInit {

//   constructor(private elr: ElementRef, private rd2: Renderer2) {}

//   ngOnInit(): void {
//     this.rd2.setStyle(this.elr.nativeElement, 'grid-area', 'title');
//   }
// }
